<!-- HTML header for doxygen 1.8.5-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>fat32lib/fat.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" width="100%">
    <tbody>
        <tr>
            <td id="projectlogo" style="text-align:left; padding-left: 0.5em;">
                <img alt="Logo" width="100" height="50" src="fat32lib.png" />
            </td>
        </tr>
        <tr style="background-image:url('tab_b.png'); height:30px">
            <td>
                <table cellspacing="0" cellpadding="0">
                    <tr>
                        <td style="padding-left: 0.5em;">
                            <div id="projectbrief">File System Stack for Embedded Devices</div>
                        </td>
                        <td style="vertical-align:middle">
                            <div>&nbsp;        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('fat_8h.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">fat.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>This is the header file for the FAT driver. It allows low level access to the file system. The functions defined in <a class="el" href="sm_8h.html" title="This header file contains all the functions needed to mount and dismount drives, register file system...">smlib\sm.h</a> allow access to all the functionality provided by this header, most users should use those instead. The only all users need to call on this module is fat_get_filesystem_interface which is defined in <a class="el" href="filesystem__interface_8h.html" title="This header contains the function that needs to be called to obtain the interface needed by smlib to ...">filesystem_interface.h</a> and allows smlib (the volume manager) to interface with fat32lib (the file system driver.) </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="sm_8h.html" title="This header file contains all the functions needed to mount and dismount drives, register file system...">smlib\sm.h</a></dd></dl>
<p><a class="el" href="sm_8h.html" title="This header file contains all the functions needed to mount and dismount drives, register file system...">smlib\sm.h</a> 
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">This structure is the volume handle. All the fields in the structure are reserved for internal use and should not be accessed directly by the developer.  <a href="struct_f_a_t___v_o_l_u_m_e.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_f_a_t___d_i_r_e_c_t_o_r_y___e_n_t_r_y.html">FAT_DIRECTORY_ENTRY</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores information about directory entries.  <a href="struct_f_a_t___d_i_r_e_c_t_o_r_y___e_n_t_r_y.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the file handle structure. All the fields in this structure are reserved for internal use and should not be accessed directly by the developer.  <a href="struct_f_a_t___f_i_l_e.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a32f798b0c7e6aba40c298003494297df"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a32f798b0c7e6aba40c298003494297df"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_USE_SYSTEM_TIME</b></td></tr>
<tr class="separator:a32f798b0c7e6aba40c298003494297df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd7d00f26426cd5a3adaab0c603cb3fc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acd7d00f26426cd5a3adaab0c603cb3fc"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_SECTOR_LENGTH</b></td></tr>
<tr class="separator:acd7d00f26426cd5a3adaab0c603cb3fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32a9e04ed94ff9d8c3efd686bc87d941"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a32a9e04ed94ff9d8c3efd686bc87d941"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FILESYSTEM_INTERFACE</b></td></tr>
<tr class="separator:a32a9e04ed94ff9d8c3efd686bc87d941"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a798e935af7f5780815a4b1a145a232f6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a798e935af7f5780815a4b1a145a232f6"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_ALLOCATE_SHARED_BUFFER</b></td></tr>
<tr class="separator:a798e935af7f5780815a4b1a145a232f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac637f5f748927402bd1ad190e1490fc9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac637f5f748927402bd1ad190e1490fc9"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FORMAT_UTILITY</b></td></tr>
<tr class="separator:ac637f5f748927402bd1ad190e1490fc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6f48b1821f8e6e77f8df557c094f5b7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af6f48b1821f8e6e77f8df557c094f5b7"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FLUSH_INTERVAL</b></td></tr>
<tr class="separator:af6f48b1821f8e6e77f8df557c094f5b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7446508698378eaf771b7e2f0c41fd58"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7446508698378eaf771b7e2f0c41fd58"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_STREAMING_IO</b></td></tr>
<tr class="separator:a7446508698378eaf771b7e2f0c41fd58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd0c4d637efd85d396d1eec4aaeffcbb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acd0c4d637efd85d396d1eec4aaeffcbb"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_OPTIMIZE_FOR_FLASH</b></td></tr>
<tr class="separator:acd0c4d637efd85d396d1eec4aaeffcbb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f4740f3617c44ae6a507c24c377d8eb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0f4740f3617c44ae6a507c24c377d8eb"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FS_TYPE_UNSPECIFIED</b></td></tr>
<tr class="separator:a0f4740f3617c44ae6a507c24c377d8eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8b72aea15a47cfcf9efdf890052a4e9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af8b72aea15a47cfcf9efdf890052a4e9"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FS_TYPE_FAT12</b></td></tr>
<tr class="separator:af8b72aea15a47cfcf9efdf890052a4e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a10e23f4ed7f71f2995dffe8709ff1074"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a10e23f4ed7f71f2995dffe8709ff1074"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FS_TYPE_FAT16</b></td></tr>
<tr class="separator:a10e23f4ed7f71f2995dffe8709ff1074"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f8989ad2ea08b2ca70c8569ecb0b3a3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7f8989ad2ea08b2ca70c8569ecb0b3a3"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FS_TYPE_FAT32</b></td></tr>
<tr class="separator:a7f8989ad2ea08b2ca70c8569ecb0b3a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3947e31154aa669346863359727507c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac3947e31154aa669346863359727507c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_ATTR_READ_ONLY</b></td></tr>
<tr class="separator:ac3947e31154aa669346863359727507c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7417c17b6e1c3d6f9bcc6f84c125ccc1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7417c17b6e1c3d6f9bcc6f84c125ccc1"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_ATTR_HIDDEN</b></td></tr>
<tr class="separator:a7417c17b6e1c3d6f9bcc6f84c125ccc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5df5f5eb50b97d421d5df34b90cacf30"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5df5f5eb50b97d421d5df34b90cacf30"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_ATTR_SYSTEM</b></td></tr>
<tr class="separator:a5df5f5eb50b97d421d5df34b90cacf30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a160e168beee0c8d140ffe2cdf58583a1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a160e168beee0c8d140ffe2cdf58583a1"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_ATTR_VOLUME_ID</b></td></tr>
<tr class="separator:a160e168beee0c8d140ffe2cdf58583a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad50209b5b697d61e976905db4a9a1964"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad50209b5b697d61e976905db4a9a1964"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_ATTR_DIRECTORY</b></td></tr>
<tr class="separator:ad50209b5b697d61e976905db4a9a1964"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab54ffa4780ab4a1bb1d79d6db569c096"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab54ffa4780ab4a1bb1d79d6db569c096"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_ATTR_ARCHIVE</b></td></tr>
<tr class="separator:ab54ffa4780ab4a1bb1d79d6db569c096"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ec9940d6346d4bf99b5359341ed6a50"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4ec9940d6346d4bf99b5359341ed6a50"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_ATTR_LONG_NAME</b></td></tr>
<tr class="separator:a4ec9940d6346d4bf99b5359341ed6a50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2888a247c33ecb442e4e5f747c72ed3d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2888a247c33ecb442e4e5f747c72ed3d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FILE_ACCESS_READ</b></td></tr>
<tr class="separator:a2888a247c33ecb442e4e5f747c72ed3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d0b555b48477b22997a574c093eede9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5d0b555b48477b22997a574c093eede9"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FILE_ACCESS_WRITE</b></td></tr>
<tr class="separator:a5d0b555b48477b22997a574c093eede9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e46e004ebe37039735f407014393709"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6e46e004ebe37039735f407014393709"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FILE_ACCESS_APPEND</b></td></tr>
<tr class="separator:a6e46e004ebe37039735f407014393709"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2117a4d5520d83778db96b921a53d9a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad2117a4d5520d83778db96b921a53d9a"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FILE_ACCESS_OVERWRITE</b></td></tr>
<tr class="separator:ad2117a4d5520d83778db96b921a53d9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88be59088f11420d8f8ea8cecc578421"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a88be59088f11420d8f8ea8cecc578421"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FILE_ACCESS_CREATE</b></td></tr>
<tr class="separator:a88be59088f11420d8f8ea8cecc578421"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c34a4cc5ab1293065125de9293103cc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8c34a4cc5ab1293065125de9293103cc"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FILE_ACCESS_CREATE_OR_OVERWRITE</b></td></tr>
<tr class="separator:a8c34a4cc5ab1293065125de9293103cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7509706e0a2b47b3047e7bbb15a0149d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7509706e0a2b47b3047e7bbb15a0149d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FILE_ACCESS_CREATE_OR_APPEND</b></td></tr>
<tr class="separator:a7509706e0a2b47b3047e7bbb15a0149d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c23e82810e3ae1baa3b47171ff63adc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3c23e82810e3ae1baa3b47171ff63adc"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FILE_FLAG_NO_BUFFERING</b></td></tr>
<tr class="separator:a3c23e82810e3ae1baa3b47171ff63adc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d7338b2da4b907f7e627a6519839859"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4d7338b2da4b907f7e627a6519839859"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FILE_FLAG_OPTIMIZE_FOR_FLASH</b></td></tr>
<tr class="separator:a4d7338b2da4b907f7e627a6519839859"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1370a077d11b82f8830d79d8ac424615"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1370a077d11b82f8830d79d8ac424615"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_SEEK_START</b></td></tr>
<tr class="separator:a1370a077d11b82f8830d79d8ac424615"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12c0fe5abf30cc647d1c0b306ee5a610"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a12c0fe5abf30cc647d1c0b306ee5a610"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_SEEK_CURRENT</b></td></tr>
<tr class="separator:a12c0fe5abf30cc647d1c0b306ee5a610"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab34d95851ea8b28646ce25c0e0039bc2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab34d95851ea8b28646ce25c0e0039bc2"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_SEEK_END</b></td></tr>
<tr class="separator:ab34d95851ea8b28646ce25c0e0039bc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a830257a0b6ce3353c20da29ad4dfc7be"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a830257a0b6ce3353c20da29ad4dfc7be"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_STREAMING_RESPONSE_STOP</b></td></tr>
<tr class="separator:a830257a0b6ce3353c20da29ad4dfc7be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8305a05dc76d785c269930c5a8f3ed76"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8305a05dc76d785c269930c5a8f3ed76"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_STREAMING_RESPONSE_SKIP</b></td></tr>
<tr class="separator:a8305a05dc76d785c269930c5a8f3ed76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8044c21e8c5c55f96c566d9302b37fb9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8044c21e8c5c55f96c566d9302b37fb9"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_STREAMING_RESPONSE_READY</b></td></tr>
<tr class="separator:a8044c21e8c5c55f96c566d9302b37fb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf60b273b90212815a31af968d800888"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abf60b273b90212815a31af968d800888"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_SUCCESS</b></td></tr>
<tr class="separator:abf60b273b90212815a31af968d800888"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af986d7f5f4737bb0d037d096aaa573a0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af986d7f5f4737bb0d037d096aaa573a0"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_UNKNOWN_ERROR</b></td></tr>
<tr class="separator:af986d7f5f4737bb0d037d096aaa573a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27a362849db32869ab3575b0033bcfef"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a27a362849db32869ab3575b0033bcfef"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_CANNOT_READ_MEDIA</b></td></tr>
<tr class="separator:a27a362849db32869ab3575b0033bcfef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd6042eebac77a534e76103aa0bd8708"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afd6042eebac77a534e76103aa0bd8708"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_CANNOT_WRITE_MEDIA</b></td></tr>
<tr class="separator:afd6042eebac77a534e76103aa0bd8708"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01dd53cbe1433fb1d7ab1d1d536f1c18"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a01dd53cbe1433fb1d7ab1d1d536f1c18"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_NOT_A_DIRECTORY</b></td></tr>
<tr class="separator:a01dd53cbe1433fb1d7ab1d1d536f1c18"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8c5ebe06476515ef34b7eb40b15baaa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af8c5ebe06476515ef34b7eb40b15baaa"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_INVALID_FILENAME</b></td></tr>
<tr class="separator:af8c5ebe06476515ef34b7eb40b15baaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7cdd4cb91c07ed6ae8826d06adac90a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af7cdd4cb91c07ed6ae8826d06adac90a"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FILENAME_ALREADY_EXISTS</b></td></tr>
<tr class="separator:af7cdd4cb91c07ed6ae8826d06adac90a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a597e9eb13b76b2315d82b0dc67be534f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a597e9eb13b76b2315d82b0dc67be534f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_INVALID_PATH</b></td></tr>
<tr class="separator:a597e9eb13b76b2315d82b0dc67be534f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab91f9309102e0451fda567611e70ff44"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab91f9309102e0451fda567611e70ff44"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_CORRUPTED_FILE</b></td></tr>
<tr class="separator:ab91f9309102e0451fda567611e70ff44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac235d7d778a149d66ff13c079d78c988"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac235d7d778a149d66ff13c079d78c988"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_ILLEGAL_FILENAME</b></td></tr>
<tr class="separator:ac235d7d778a149d66ff13c079d78c988"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adda99b9841482981a0e18ee2af116dd6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adda99b9841482981a0e18ee2af116dd6"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FILENAME_TOO_LONG</b></td></tr>
<tr class="separator:adda99b9841482981a0e18ee2af116dd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0792bbdad9e757fe9b93a14c5705df05"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0792bbdad9e757fe9b93a14c5705df05"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_NOT_A_FILE</b></td></tr>
<tr class="separator:a0792bbdad9e757fe9b93a14c5705df05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1abc3c3b4bd6006b9242c87aa9567912"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1abc3c3b4bd6006b9242c87aa9567912"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FILE_NOT_FOUND</b></td></tr>
<tr class="separator:a1abc3c3b4bd6006b9242c87aa9567912"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a50c6386713254fdc7b15f5a401bc96"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a50c6386713254fdc7b15f5a401bc96"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_DIRECTORY_DOES_NOT_EXIST</b></td></tr>
<tr class="separator:a9a50c6386713254fdc7b15f5a401bc96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9558890db8561ce0d4e204417db1fa3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae9558890db8561ce0d4e204417db1fa3"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_INSUFFICIENT_DISK_SPACE</b></td></tr>
<tr class="separator:ae9558890db8561ce0d4e204417db1fa3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60d352716be70670877bba81763e119c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a60d352716be70670877bba81763e119c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FEATURE_NOT_SUPPORTED</b></td></tr>
<tr class="separator:a60d352716be70670877bba81763e119c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcd921854686acc969e660338295074d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adcd921854686acc969e660338295074d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_OP_IN_PROGRESS</b></td></tr>
<tr class="separator:adcd921854686acc969e660338295074d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d921894b92e58afb331e3e3dac18010"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5d921894b92e58afb331e3e3dac18010"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_SECTOR_SIZE_NOT_SUPPORTED</b></td></tr>
<tr class="separator:a5d921894b92e58afb331e3e3dac18010"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f49e23048423ad05c8dac6add1987b7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6f49e23048423ad05c8dac6add1987b7"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_LFN_GENERATED</b></td></tr>
<tr class="separator:a6f49e23048423ad05c8dac6add1987b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a7a9e898b8dae89a663da6d47e952da"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1a7a9e898b8dae89a663da6d47e952da"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_SHORT_LFN_GENERATED</b></td></tr>
<tr class="separator:a1a7a9e898b8dae89a663da6d47e952da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a203ad6a116bed0a6385d9350b756095b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a203ad6a116bed0a6385d9350b756095b"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_SEEK_FAILED</b></td></tr>
<tr class="separator:a203ad6a116bed0a6385d9350b756095b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9e7380f73ca273777693ed58e3a299d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa9e7380f73ca273777693ed58e3a299d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FILE_NOT_OPENED_FOR_WRITE_ACCESS</b></td></tr>
<tr class="separator:aa9e7380f73ca273777693ed58e3a299d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a7cb21cae8303d7f4c93d360cbebf89"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a7cb21cae8303d7f4c93d360cbebf89"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_INVALID_HANDLE</b></td></tr>
<tr class="separator:a9a7cb21cae8303d7f4c93d360cbebf89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5f13a9cd68d294f0a9d3fa781845351"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af5f13a9cd68d294f0a9d3fa781845351"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_INVALID_CLUSTER</b></td></tr>
<tr class="separator:af5f13a9cd68d294f0a9d3fa781845351"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb17b592cae077925fe4732168b26f72"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeb17b592cae077925fe4732168b26f72"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_INVALID_FAT_VOLUME</b></td></tr>
<tr class="separator:aeb17b592cae077925fe4732168b26f72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa084f19e4b0f9dfa7eeb0ecc77828786"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa084f19e4b0f9dfa7eeb0ecc77828786"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_INVALID_VOLUME_LABEL</b></td></tr>
<tr class="separator:aa084f19e4b0f9dfa7eeb0ecc77828786"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad39633fda9128f4f3ee9ebbfbc1438cd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad39633fda9128f4f3ee9ebbfbc1438cd"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_INVALID_FORMAT_PARAMETERS</b></td></tr>
<tr class="separator:ad39633fda9128f4f3ee9ebbfbc1438cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb4d3506627b98b6681d66ada23f7ee0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adb4d3506627b98b6681d66ada23f7ee0"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_ROOT_DIRECTORY_LIMIT_EXCEEDED</b></td></tr>
<tr class="separator:adb4d3506627b98b6681d66ada23f7ee0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acef35005bdea20589a0979c565ce4c33"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acef35005bdea20589a0979c565ce4c33"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_DIRECTORY_LIMIT_EXCEEDED</b></td></tr>
<tr class="separator:acef35005bdea20589a0979c565ce4c33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc0da9e876aabcb6aa30e62ab75bada8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afc0da9e876aabcb6aa30e62ab75bada8"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_INVALID_PARAMETERS</b></td></tr>
<tr class="separator:afc0da9e876aabcb6aa30e62ab75bada8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd25d40f4ebde38041e0793bd43d309c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afd25d40f4ebde38041e0793bd43d309c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FILE_HANDLE_IN_USE</b></td></tr>
<tr class="separator:afd25d40f4ebde38041e0793bd43d309c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea8f53a176a54dc2065a91f8bee107d1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aea8f53a176a54dc2065a91f8bee107d1"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FILE_BUFFER_NOT_SET</b></td></tr>
<tr class="separator:aea8f53a176a54dc2065a91f8bee107d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad962d4ba562dffb3f98e9b6fd0daec8b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad962d4ba562dffb3f98e9b6fd0daec8b"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_MISALIGNED_IO</b></td></tr>
<tr class="separator:ad962d4ba562dffb3f98e9b6fd0daec8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a8aa935d0af920f961e57f6923af02b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3a8aa935d0af920f961e57f6923af02b"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_AWAITING_DATA</b></td></tr>
<tr class="separator:a3a8aa935d0af920f961e57f6923af02b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a717a01fec9341b4bf9c8b6fe8a8b629c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a717a01fec9341b4bf9c8b6fe8a8b629c"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_BUFFER_TOO_BIG</b></td></tr>
<tr class="separator:a717a01fec9341b4bf9c8b6fe8a8b629c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ccd63167b5d4a9f5e7a6fdf1215cd9e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2ccd63167b5d4a9f5e7a6fdf1215cd9e"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_LOWERCASE_EXTENSION</b></td></tr>
<tr class="separator:a2ccd63167b5d4a9f5e7a6fdf1215cd9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af510c5a748568c774b6d925358c23778"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af510c5a748568c774b6d925358c23778"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_LOWERCASE_BASENAME</b></td></tr>
<tr class="separator:af510c5a748568c774b6d925358c23778"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a882b01eed1067a7910ad9460b7fcfe1f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a882b01eed1067a7910ad9460b7fcfe1f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_MAX_PATH</b></td></tr>
<tr class="separator:a882b01eed1067a7910ad9460b7fcfe1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a825c04c4839d1d89384a1b9f68d08013"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a825c04c4839d1d89384a1b9f68d08013"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_FIRST_LFN_ENTRY</b></td></tr>
<tr class="separator:a825c04c4839d1d89384a1b9f68d08013"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93479cf2904b378731a07e0e1569555b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a93479cf2904b378731a07e0e1569555b"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FAT_MAX_FILENAME</b></td></tr>
<tr class="separator:a93479cf2904b378731a07e0e1569555b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a8c38edd8f851e25c4fadbea43488480f"><td class="memItemLeft" align="right" valign="top">typedef time_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a8c38edd8f851e25c4fadbea43488480f">FAT_GET_SYSTEM_TIME</a> )(void)</td></tr>
<tr class="memdesc:a8c38edd8f851e25c4fadbea43488480f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function pointer to get the system time. <a href="#a8c38edd8f851e25c4fadbea43488480f">More...</a><br/></td></tr>
<tr class="separator:a8c38edd8f851e25c4fadbea43488480f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e2a39ea21368ed965a2780cfc144f3b"><td class="memItemLeft" align="right" valign="top">typedef void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a6e2a39ea21368ed965a2780cfc144f3b">FAT_ASYNC_CALLBACK</a> (void *context, uint16_t *state)</td></tr>
<tr class="memdesc:a6e2a39ea21368ed965a2780cfc144f3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback function for asynchronous IO. <a href="#a6e2a39ea21368ed965a2780cfc144f3b">More...</a><br/></td></tr>
<tr class="separator:a6e2a39ea21368ed965a2780cfc144f3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a251e8e98091db9a540729dd12d6458b4"><td class="memItemLeft" align="right" valign="top">typedef void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a251e8e98091db9a540729dd12d6458b4">FAT_STREAM_CALLBACK</a> (void *context, uint16_t *state, unsigned char **buffer, uint16_t *response)</td></tr>
<tr class="memdesc:a251e8e98091db9a540729dd12d6458b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback function for asynchronous STREAMING IO. <a href="#a251e8e98091db9a540729dd12d6458b4">More...</a><br/></td></tr>
<tr class="separator:a251e8e98091db9a540729dd12d6458b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a3d1f5d8e3b22672684528c112bc6ff06"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a3d1f5d8e3b22672684528c112bc6ff06">fat_init</a> ()</td></tr>
<tr class="memdesc:a3d1f5d8e3b22672684528c112bc6ff06"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the FAT library. <a href="#a3d1f5d8e3b22672684528c112bc6ff06">More...</a><br/></td></tr>
<tr class="separator:a3d1f5d8e3b22672684528c112bc6ff06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a747d45fc177d46ee2a0100a4a1326f46"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a747d45fc177d46ee2a0100a4a1326f46">fat_mount_volume</a> (<a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *volume, <a class="el" href="struct_s_t_o_r_a_g_e___d_e_v_i_c_e.html">STORAGE_DEVICE</a> *device)</td></tr>
<tr class="memdesc:a747d45fc177d46ee2a0100a4a1326f46"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mounts a FAT volume.  <a href="#a747d45fc177d46ee2a0100a4a1326f46">More...</a><br/></td></tr>
<tr class="separator:a747d45fc177d46ee2a0100a4a1326f46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a286a3a7992a31024f02da0aec0a81427"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a286a3a7992a31024f02da0aec0a81427">fat_dismount_volume</a> (<a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *volume)</td></tr>
<tr class="memdesc:a286a3a7992a31024f02da0aec0a81427"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dismounts a FAT volume.  <a href="#a286a3a7992a31024f02da0aec0a81427">More...</a><br/></td></tr>
<tr class="separator:a286a3a7992a31024f02da0aec0a81427"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0e058731eb04e82857b914b714c1723"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#aa0e058731eb04e82857b914b714c1723">fat_get_sector_size</a> (<a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *volume)</td></tr>
<tr class="memdesc:aa0e058731eb04e82857b914b714c1723"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the sector size of a volume in bytes. <a href="#aa0e058731eb04e82857b914b714c1723">More...</a><br/></td></tr>
<tr class="separator:aa0e058731eb04e82857b914b714c1723"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99816f5f466d245277bdf678152770f9"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a99816f5f466d245277bdf678152770f9">fat_get_file_entry</a> (<a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *volume, char *path, <a class="el" href="struct_f_a_t___d_i_r_e_c_t_o_r_y___e_n_t_r_y.html">FAT_DIRECTORY_ENTRY</a> *entry)</td></tr>
<tr class="memdesc:a99816f5f466d245277bdf678152770f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the directory entry of a file. This function should be used to get information about a file such as file size, timestamps, and attributes.  <a href="#a99816f5f466d245277bdf678152770f9">More...</a><br/></td></tr>
<tr class="separator:a99816f5f466d245277bdf678152770f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88d8f9c787986468fcc67b6e13d1daa3"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a88d8f9c787986468fcc67b6e13d1daa3">fat_find_first_entry</a> (<a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *volume, char *path, unsigned char attributes, <a class="el" href="struct_f_a_t___d_i_r_e_c_t_o_r_y___e_n_t_r_y.html">FAT_DIRECTORY_ENTRY</a> **dir_entry, FAT_FILESYSTEM_QUERY *query)</td></tr>
<tr class="memdesc:a88d8f9c787986468fcc67b6e13d1daa3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the first entry in a directory.  <a href="#a88d8f9c787986468fcc67b6e13d1daa3">More...</a><br/></td></tr>
<tr class="separator:a88d8f9c787986468fcc67b6e13d1daa3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a595a506893aca97c9946b710b1146818"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a595a506893aca97c9946b710b1146818">fat_find_next_entry</a> (<a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *volume, <a class="el" href="struct_f_a_t___d_i_r_e_c_t_o_r_y___e_n_t_r_y.html">FAT_DIRECTORY_ENTRY</a> **dir_entry, FAT_FILESYSTEM_QUERY *query)</td></tr>
<tr class="memdesc:a595a506893aca97c9946b710b1146818"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the next entry in a directory.  <a href="#a595a506893aca97c9946b710b1146818">More...</a><br/></td></tr>
<tr class="separator:a595a506893aca97c9946b710b1146818"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a631e46690515aa50a5580e9ab977c57b"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a631e46690515aa50a5580e9ab977c57b">fat_create_directory</a> (<a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *volume, char *filename)</td></tr>
<tr class="memdesc:a631e46690515aa50a5580e9ab977c57b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new directory on the volume.  <a href="#a631e46690515aa50a5580e9ab977c57b">More...</a><br/></td></tr>
<tr class="separator:a631e46690515aa50a5580e9ab977c57b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac503be1f60175f502c13dcf2113b0042"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#ac503be1f60175f502c13dcf2113b0042">fat_file_delete</a> (<a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *volume, char *filename)</td></tr>
<tr class="memdesc:ac503be1f60175f502c13dcf2113b0042"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a file.  <a href="#ac503be1f60175f502c13dcf2113b0042">More...</a><br/></td></tr>
<tr class="separator:ac503be1f60175f502c13dcf2113b0042"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62b9ccab290608d5aa00624552896f4b"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a62b9ccab290608d5aa00624552896f4b">fat_file_rename</a> (<a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *volume, char *original_filename, char *new_filename)</td></tr>
<tr class="memdesc:a62b9ccab290608d5aa00624552896f4b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Renames a file.  <a href="#a62b9ccab290608d5aa00624552896f4b">More...</a><br/></td></tr>
<tr class="separator:a62b9ccab290608d5aa00624552896f4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab74ec7692bce9cd3b3723d24828b7a27"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#ab74ec7692bce9cd3b3723d24828b7a27">fat_file_open</a> (<a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *volume, char *filename, unsigned char access_flags, <a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *file)</td></tr>
<tr class="memdesc:ab74ec7692bce9cd3b3723d24828b7a27"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens or create a file.  <a href="#ab74ec7692bce9cd3b3723d24828b7a27">More...</a><br/></td></tr>
<tr class="separator:ab74ec7692bce9cd3b3723d24828b7a27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acde6b996aa45281866c34854ee20e90d"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#acde6b996aa45281866c34854ee20e90d">fat_file_set_buffer</a> (<a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *file, unsigned char *buffer)</td></tr>
<tr class="memdesc:acde6b996aa45281866c34854ee20e90d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets an external buffer for this file handle.  <a href="#acde6b996aa45281866c34854ee20e90d">More...</a><br/></td></tr>
<tr class="separator:acde6b996aa45281866c34854ee20e90d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd478a323ec6d74ca4e7876a6eba6bf7"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#acd478a323ec6d74ca4e7876a6eba6bf7">fat_file_get_unique_id</a> (<a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *file)</td></tr>
<tr class="memdesc:acd478a323ec6d74ca4e7876a6eba6bf7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the unique identifier of the file.  <a href="#acd478a323ec6d74ca4e7876a6eba6bf7">More...</a><br/></td></tr>
<tr class="separator:acd478a323ec6d74ca4e7876a6eba6bf7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89f7bf9ced81354a4611ce790d2db6b7"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a89f7bf9ced81354a4611ce790d2db6b7">fat_file_alloc</a> (<a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *file, uint32_t bytes)</td></tr>
<tr class="memdesc:a89f7bf9ced81354a4611ce790d2db6b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates disk space to an open file.  <a href="#a89f7bf9ced81354a4611ce790d2db6b7">More...</a><br/></td></tr>
<tr class="separator:a89f7bf9ced81354a4611ce790d2db6b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46240e352239cbf5edcb659cd0675017"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a46240e352239cbf5edcb659cd0675017">fat_file_seek</a> (<a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *file, uint32_t offset, char mode)</td></tr>
<tr class="memdesc:a46240e352239cbf5edcb659cd0675017"><td class="mdescLeft">&#160;</td><td class="mdescRight">Moves the file cursor to a new position within the file.  <a href="#a46240e352239cbf5edcb659cd0675017">More...</a><br/></td></tr>
<tr class="separator:a46240e352239cbf5edcb659cd0675017"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b77c490d4814955e20342e53f49dd37"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a9b77c490d4814955e20342e53f49dd37">fat_file_write</a> (<a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *file, unsigned char *buffer, uint32_t length)</td></tr>
<tr class="memdesc:a9b77c490d4814955e20342e53f49dd37"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes the specified number of bytes to the current position on an opened file.  <a href="#a9b77c490d4814955e20342e53f49dd37">More...</a><br/></td></tr>
<tr class="separator:a9b77c490d4814955e20342e53f49dd37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f23bec74776edab9601e8770d2e9174"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a4f23bec74776edab9601e8770d2e9174">fat_file_write_async</a> (<a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *handle, unsigned char *buffer, uint32_t length, uint16_t *result, <a class="el" href="fat_8h.html#a6e2a39ea21368ed965a2780cfc144f3b">FAT_ASYNC_CALLBACK</a> *callback, void *callback_context)</td></tr>
<tr class="memdesc:a4f23bec74776edab9601e8770d2e9174"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes the specified number of bytes to the current position on an opened file asynchronously.  <a href="#a4f23bec74776edab9601e8770d2e9174">More...</a><br/></td></tr>
<tr class="separator:a4f23bec74776edab9601e8770d2e9174"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36b8a2d039c13e484ea8050ee86cdb1b"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a36b8a2d039c13e484ea8050ee86cdb1b">fat_file_write_stream</a> (<a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *handle, unsigned char *buffer, uint32_t length, uint16_t *result, <a class="el" href="fat_8h.html#a251e8e98091db9a540729dd12d6458b4">FAT_STREAM_CALLBACK</a> *callback, void *callback_context)</td></tr>
<tr class="memdesc:a36b8a2d039c13e484ea8050ee86cdb1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initiates a stream write. This function is used to write data continuosly to the file system. When used with SD cards or other flash devices it will write multiple sectors at once thus increasing performance. It accomplish this without requiring you to allocate large buffers to hold multiple sectors. This function supports both unbuffered and buffered IO but it is recommended that you use unbuffered IO for better performance. Once you initiate a stream write with this function the data you provided will be written to the device, and as soon as the transfer is complete (even while the device is still writing the data) the callback function provided through the callback parameter will be invoked. In this function you must either reload the buffer or replace it with a different one (a pointer to the buffer is passed to the function for this) and set the response argument to FAT_STREAMING_RESPONSE_READY. As long as you do this everytime and there are no other requests pending the driver will use a single command to write multiple sectors to the device. If you don't have the data ready when the callback function is called you can set the response pointer to FAT_STREAMING_RESPONSE_SKIP. In that case the driver will complete the multiple sector transfer and release the device for other requests to use, once the device becomes available again the callback function will be called. This process is repeated until you either supply the data and set the response pointer to FAT_STREAMING_RESPONSE_READY or end the transfer by setting the response pointer to FAT_STREAMING_RESPONSE_STOP. Once you set the response pointer to FAT_STREAMING_RESPONSE_STOP the callback function will be called once more to notify you of the result. If an error occurs before that transaction is complete the result pointer will be set to the error code. When the transaction is completed successfully the result pointer is set to SM_SUCCESS, otherwise if the file system is waiting for you to reload the buffer the result pointer is set to FAT_AWAITING_DATA. Please see the examples included for more details.  <a href="#a36b8a2d039c13e484ea8050ee86cdb1b">More...</a><br/></td></tr>
<tr class="separator:a36b8a2d039c13e484ea8050ee86cdb1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2342bb055dbc8ae9c344d9e666dae124"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a2342bb055dbc8ae9c344d9e666dae124">fat_file_read</a> (<a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *handle, unsigned char *buffer, uint32_t length, uint32_t *bytes_read)</td></tr>
<tr class="memdesc:a2342bb055dbc8ae9c344d9e666dae124"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the specified number of bytes from the current position on an opened file.  <a href="#a2342bb055dbc8ae9c344d9e666dae124">More...</a><br/></td></tr>
<tr class="separator:a2342bb055dbc8ae9c344d9e666dae124"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a916d916f30d70bbfdd3d0dfab7004f"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a7a916d916f30d70bbfdd3d0dfab7004f">fat_file_read_async</a> (<a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *handle, unsigned char *buffer, uint32_t length, uint32_t *bytes_read, uint16_t *result, <a class="el" href="fat_8h.html#a6e2a39ea21368ed965a2780cfc144f3b">FAT_ASYNC_CALLBACK</a> *callback, void *callback_context)</td></tr>
<tr class="memdesc:a7a916d916f30d70bbfdd3d0dfab7004f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the specified number of bytes from the current position on an opened file asynchronously.  <a href="#a7a916d916f30d70bbfdd3d0dfab7004f">More...</a><br/></td></tr>
<tr class="separator:a7a916d916f30d70bbfdd3d0dfab7004f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a0c25938748e7952f0fab99b8063aa5"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a7a0c25938748e7952f0fab99b8063aa5">fat_file_flush</a> (<a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *file)</td></tr>
<tr class="memdesc:a7a0c25938748e7952f0fab99b8063aa5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flushes file buffers and updates directory entry.  <a href="#a7a0c25938748e7952f0fab99b8063aa5">More...</a><br/></td></tr>
<tr class="separator:a7a0c25938748e7952f0fab99b8063aa5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c508b2d8986f2bccfb4a2588f11b5a3"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fat_8h.html#a9c508b2d8986f2bccfb4a2588f11b5a3">fat_file_close</a> (<a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *handle)</td></tr>
<tr class="memdesc:a9c508b2d8986f2bccfb4a2588f11b5a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes an open file.  <a href="#a9c508b2d8986f2bccfb4a2588f11b5a3">More...</a><br/></td></tr>
<tr class="separator:a9c508b2d8986f2bccfb4a2588f11b5a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ace23dd25ee8dfd1d2d915c130bfe332e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ace23dd25ee8dfd1d2d915c130bfe332e"></a>
unsigned char&#160;</td><td class="memItemRight" valign="bottom"><b>fat_shared_buffer</b> [MAX_SECTOR_LENGTH]</td></tr>
<tr class="separator:ace23dd25ee8dfd1d2d915c130bfe332e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a0e6ba85e4090be6e3dcbfc3191be39"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3a0e6ba85e4090be6e3dcbfc3191be39"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>fat_shared_buffer_sector</b></td></tr>
<tr class="separator:a3a0e6ba85e4090be6e3dcbfc3191be39"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This is the header file for the FAT driver. It allows low level access to the file system. The functions defined in <a class="el" href="sm_8h.html" title="This header file contains all the functions needed to mount and dismount drives, register file system...">smlib\sm.h</a> allow access to all the functionality provided by this header, most users should use those instead. The only all users need to call on this module is fat_get_filesystem_interface which is defined in <a class="el" href="filesystem__interface_8h.html" title="This header contains the function that needs to be called to obtain the interface needed by smlib to ...">filesystem_interface.h</a> and allows smlib (the volume manager) to interface with fat32lib (the file system driver.) </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="sm_8h.html" title="This header file contains all the functions needed to mount and dismount drives, register file system...">smlib\sm.h</a></dd></dl>
<p><a class="el" href="sm_8h.html" title="This header file contains all the functions needed to mount and dismount drives, register file system...">smlib\sm.h</a></p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="a6e2a39ea21368ed965a2780cfc144f3b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void FAT_ASYNC_CALLBACK(void *context, uint16_t *state)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Callback function for asynchronous IO.</p>

</div>
</div>
<a class="anchor" id="a8c38edd8f851e25c4fadbea43488480f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef time_t(* FAT_GET_SYSTEM_TIME)(void)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function pointer to get the system time.</p>

</div>
</div>
<a class="anchor" id="a251e8e98091db9a540729dd12d6458b4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void FAT_STREAM_CALLBACK(void *context, uint16_t *state, unsigned char **buffer, uint16_t *response)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Callback function for asynchronous STREAMING IO.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a631e46690515aa50a5580e9ab977c57b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_create_directory </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *&#160;</td>
          <td class="paramname"><em>volume</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>filename</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new directory on the volume. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">volume</td><td>A pointer to the volume handle (<a class="el" href="struct_f_a_t___v_o_l_u_m_e.html" title="This structure is the volume handle. All the fields in the structure are reserved for internal use an...">FAT_VOLUME</a>).</td></tr>
    <tr><td class="paramname">filename</td><td>The full path to the new directory.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>One of the return codes defined in <a class="el" href="fat_8h.html" title="This is the header file for the FAT driver. It allows low level access to the file system...">fat.h</a>.</dd></dl>

</div>
</div>
<a class="anchor" id="a286a3a7992a31024f02da0aec0a81427"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_dismount_volume </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *&#160;</td>
          <td class="paramname"><em>volume</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Dismounts a FAT volume. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">volume</td><td>The handle of the volume to dismount.</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a89f7bf9ced81354a4611ce790d2db6b7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_file_alloc </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocates disk space to an open file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">file</td><td>A pointer to a file handle <a class="el" href="struct_f_a_t___f_i_l_e.html" title="This is the file handle structure. All the fields in this structure are reserved for internal use and...">FAT_FILE</a> structure.</td></tr>
    <tr><td class="paramname">bytes</td><td>The amount of disk space (in bytes) to be allocated.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>One of the return codes defined in <a class="el" href="fat_8h.html" title="This is the header file for the FAT driver. It allows low level access to the file system...">fat.h</a>.</dd></dl>
<p>When writting large files in small chunks calling this function to pre-allocate drive space significantly improves write speed. Any space that is not used will be freed when the file is closed.</p>
<p>This function will allocate enough disk space to write the requested amount of bytes after the current poisition of the file. So if you request 5K bytes and there's already 2K bytes allocated after the cursor position it will only allocate 3K bytes. All disk allocations are done in multiples of the cluster size. </p>

</div>
</div>
<a class="anchor" id="a9c508b2d8986f2bccfb4a2588f11b5a3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_file_close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *&#160;</td>
          <td class="paramname"><em>handle</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Closes an open file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A pointer to the file handle <a class="el" href="struct_f_a_t___f_i_l_e.html" title="This is the file handle structure. All the fields in this structure are reserved for internal use and...">FAT_FILE</a> structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>One of the return codes defined in <a class="el" href="fat_8h.html" title="This is the header file for the FAT driver. It allows low level access to the file system...">fat.h</a>.</dd></dl>

</div>
</div>
<a class="anchor" id="ac503be1f60175f502c13dcf2113b0042"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_file_delete </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *&#160;</td>
          <td class="paramname"><em>volume</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>filename</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Deletes a file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">volume</td><td>A pointer to the volume handle (<a class="el" href="struct_f_a_t___v_o_l_u_m_e.html" title="This structure is the volume handle. All the fields in the structure are reserved for internal use an...">FAT_VOLUME</a> structure).</td></tr>
    <tr><td class="paramname">filename</td><td>The full path and filename of the file to delete.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>One of the return codes defined in <a class="el" href="fat_8h.html" title="This is the header file for the FAT driver. It allows low level access to the file system...">fat.h</a>.</dd></dl>

</div>
</div>
<a class="anchor" id="a7a0c25938748e7952f0fab99b8063aa5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_file_flush </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *&#160;</td>
          <td class="paramname"><em>file</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Flushes file buffers and updates directory entry. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">file</td><td>A pointer to the file handle (<a class="el" href="struct_f_a_t___f_i_l_e.html" title="This is the file handle structure. All the fields in this structure are reserved for internal use and...">FAT_FILE</a>) structure.</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="acd478a323ec6d74ca4e7876a6eba6bf7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t fat_file_get_unique_id </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *&#160;</td>
          <td class="paramname"><em>file</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the unique identifier of the file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">file</td><td>An open file handle.</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab74ec7692bce9cd3b3723d24828b7a27"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_file_open </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *&#160;</td>
          <td class="paramname"><em>volume</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>access_flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *&#160;</td>
          <td class="paramname"><em>file</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Opens or create a file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">volume</td><td>A pointer to the volume handle (<a class="el" href="struct_f_a_t___v_o_l_u_m_e.html" title="This structure is the volume handle. All the fields in the structure are reserved for internal use an...">FAT_VOLUME</a> structure).</td></tr>
    <tr><td class="paramname">filename</td><td>The full path and filename of the file to open.</td></tr>
    <tr><td class="paramname">access_flags</td><td>An ORed list of one or more of the access flags defined in <a class="el" href="fat_8h.html" title="This is the header file for the FAT driver. It allows low level access to the file system...">fat.h</a></td></tr>
    <tr><td class="paramname">file</td><td>A pointer to a file handle <a class="el" href="struct_f_a_t___f_i_l_e.html" title="This is the file handle structure. All the fields in this structure are reserved for internal use and...">FAT_FILE</a> structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>One of the return codes defined in <a class="el" href="fat_8h.html" title="This is the header file for the FAT driver. It allows low level access to the file system...">fat.h</a>.</dd></dl>

</div>
</div>
<a class="anchor" id="a2342bb055dbc8ae9c344d9e666dae124"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_file_read </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t *&#160;</td>
          <td class="paramname"><em>bytes_read</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads the specified number of bytes from the current position on an opened file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A pointer to a file handle <a class="el" href="struct_f_a_t___f_i_l_e.html" title="This is the file handle structure. All the fields in this structure are reserved for internal use and...">FAT_FILE</a> structure.</td></tr>
    <tr><td class="paramname">buffer</td><td>A buffer where the bytes will be copied to.</td></tr>
    <tr><td class="paramname">length</td><td>The amount of bytes to read.</td></tr>
    <tr><td class="paramname">bytes_read</td><td>A pointer to a 32 bit integer where the amount of bytes read will be written to.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>One of the return codes defined in <a class="el" href="fat_8h.html" title="This is the header file for the FAT driver. It allows low level access to the file system...">fat.h</a>.</dd></dl>

</div>
</div>
<a class="anchor" id="a7a916d916f30d70bbfdd3d0dfab7004f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_file_read_async </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t *&#160;</td>
          <td class="paramname"><em>bytes_read</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="fat_8h.html#a6e2a39ea21368ed965a2780cfc144f3b">FAT_ASYNC_CALLBACK</a> *&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>callback_context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads the specified number of bytes from the current position on an opened file asynchronously. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A pointer to a file handle <a class="el" href="struct_f_a_t___f_i_l_e.html" title="This is the file handle structure. All the fields in this structure are reserved for internal use and...">FAT_FILE</a> structure.</td></tr>
    <tr><td class="paramname">buffer</td><td>A buffer where the bytes will be copied to.</td></tr>
    <tr><td class="paramname">length</td><td>The amount of bytes to read.</td></tr>
    <tr><td class="paramname">bytes_read</td><td>A pointer to a 32 bit integer where the amount of bytes read will be written to.</td></tr>
    <tr><td class="paramname">result</td><td>A pointer to a 16-bit unsigned integer where the result of the operation will be saved.</td></tr>
    <tr><td class="paramname">callback</td><td>A callback function that will be called when the operation completes.</td></tr>
    <tr><td class="paramname">callback_context</td><td>A pointer that will be passed to the callback function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>One of the return codes defined in <a class="el" href="fat_8h.html" title="This is the header file for the FAT driver. It allows low level access to the file system...">fat.h</a>.</dd></dl>
<p>If the operation is initialized successfully this function will return FAT_SUCCESS, however the operation may still fail and the actual return code is stored on the 16 bit integer pointed to by the result parameter when the operation completes. </p>

</div>
</div>
<a class="anchor" id="a62b9ccab290608d5aa00624552896f4b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_file_rename </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *&#160;</td>
          <td class="paramname"><em>volume</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>original_filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>new_filename</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Renames a file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">volume</td><td>A pointer to the volume handle (<a class="el" href="struct_f_a_t___v_o_l_u_m_e.html" title="This structure is the volume handle. All the fields in the structure are reserved for internal use an...">FAT_VOLUME</a> structure).</td></tr>
    <tr><td class="paramname">original_filename</td><td>The full path and original filename of the file to be renamed.</td></tr>
    <tr><td class="paramname">new_filename</td><td>The full path and new filename for the file.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>One of the return codes defined in <a class="el" href="fat_8h.html" title="This is the header file for the FAT driver. It allows low level access to the file system...">fat.h</a>.</dd></dl>

</div>
</div>
<a class="anchor" id="a46240e352239cbf5edcb659cd0675017"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_file_seek </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Moves the file cursor to a new position within the file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">file</td><td>A pointer to the file handle <a class="el" href="struct_f_a_t___f_i_l_e.html" title="This is the file handle structure. All the fields in this structure are reserved for internal use and...">FAT_FILE</a> structure.</td></tr>
    <tr><td class="paramname">offset</td><td>The offset of the new cursor position relative to the position specified by the mode param.</td></tr>
    <tr><td class="paramname">mode</td><td>One of the supported seek modes: FAT_SEEK_START, FAT_SEEK_CURRENT, or FAT_SEEK_END.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>One of the return codes defined in <a class="el" href="fat_8h.html" title="This is the header file for the FAT driver. It allows low level access to the file system...">fat.h</a>.</dd></dl>
<p>If FAT_SEEK_END is specified the offset must be 0 or the function will fail. </p>

</div>
</div>
<a class="anchor" id="acde6b996aa45281866c34854ee20e90d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_file_set_buffer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&#160;</td>
          <td class="paramname"><em>buffer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets an external buffer for this file handle. </p>

</div>
</div>
<a class="anchor" id="a9b77c490d4814955e20342e53f49dd37"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_file_write </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *&#160;</td>
          <td class="paramname"><em>file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes the specified number of bytes to the current position on an opened file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">file</td><td>A pointer to a file handle <a class="el" href="struct_f_a_t___f_i_l_e.html" title="This is the file handle structure. All the fields in this structure are reserved for internal use and...">FAT_FILE</a> structure.</td></tr>
    <tr><td class="paramname">buffer</td><td>A buffer containing the bytes to be written.</td></tr>
    <tr><td class="paramname">length</td><td>The amount of bytes to write.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>One of the return codes defined in <a class="el" href="fat_8h.html" title="This is the header file for the FAT driver. It allows low level access to the file system...">fat.h</a>.</dd></dl>

</div>
</div>
<a class="anchor" id="a4f23bec74776edab9601e8770d2e9174"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_file_write_async </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="fat_8h.html#a6e2a39ea21368ed965a2780cfc144f3b">FAT_ASYNC_CALLBACK</a> *&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>callback_context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Writes the specified number of bytes to the current position on an opened file asynchronously. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A pointer to a file handle <a class="el" href="struct_f_a_t___f_i_l_e.html" title="This is the file handle structure. All the fields in this structure are reserved for internal use and...">FAT_FILE</a> structure.</td></tr>
    <tr><td class="paramname">buffer</td><td>A buffer containing the bytes to be written.</td></tr>
    <tr><td class="paramname">length</td><td>The amount of bytes to write.</td></tr>
    <tr><td class="paramname">result</td><td>A pointer to a 16-bit unsigned integer where the result of the operation will be saved.</td></tr>
    <tr><td class="paramname">callback</td><td>A callback function that will be called when the operation completes.</td></tr>
    <tr><td class="paramname">callback_context</td><td>A pointer that will be passed to the callback function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>One of the return codes defined in <a class="el" href="fat_8h.html" title="This is the header file for the FAT driver. It allows low level access to the file system...">fat.h</a>.</dd></dl>
<p>If the operation is initialized successfully this function will return FAT_OP_IN_PROGRESS, however the operation may still fail and the actual return code is stored on the 16 bit integer pointed to by the result parameter when the operation completes. </p>

</div>
</div>
<a class="anchor" id="a36b8a2d039c13e484ea8050ee86cdb1b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_file_write_stream </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___f_i_l_e.html">FAT_FILE</a> *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="fat_8h.html#a251e8e98091db9a540729dd12d6458b4">FAT_STREAM_CALLBACK</a> *&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>callback_context</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initiates a stream write. This function is used to write data continuosly to the file system. When used with SD cards or other flash devices it will write multiple sectors at once thus increasing performance. It accomplish this without requiring you to allocate large buffers to hold multiple sectors. This function supports both unbuffered and buffered IO but it is recommended that you use unbuffered IO for better performance. Once you initiate a stream write with this function the data you provided will be written to the device, and as soon as the transfer is complete (even while the device is still writing the data) the callback function provided through the callback parameter will be invoked. In this function you must either reload the buffer or replace it with a different one (a pointer to the buffer is passed to the function for this) and set the response argument to FAT_STREAMING_RESPONSE_READY. As long as you do this everytime and there are no other requests pending the driver will use a single command to write multiple sectors to the device. If you don't have the data ready when the callback function is called you can set the response pointer to FAT_STREAMING_RESPONSE_SKIP. In that case the driver will complete the multiple sector transfer and release the device for other requests to use, once the device becomes available again the callback function will be called. This process is repeated until you either supply the data and set the response pointer to FAT_STREAMING_RESPONSE_READY or end the transfer by setting the response pointer to FAT_STREAMING_RESPONSE_STOP. Once you set the response pointer to FAT_STREAMING_RESPONSE_STOP the callback function will be called once more to notify you of the result. If an error occurs before that transaction is complete the result pointer will be set to the error code. When the transaction is completed successfully the result pointer is set to SM_SUCCESS, otherwise if the file system is waiting for you to reload the buffer the result pointer is set to FAT_AWAITING_DATA. Please see the examples included for more details. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>A pointer to a file handle <a class="el" href="struct_f_a_t___f_i_l_e.html" title="This is the file handle structure. All the fields in this structure are reserved for internal use and...">FAT_FILE</a> structure.</td></tr>
    <tr><td class="paramname">buffer</td><td>A buffer containing the bytes to be written.</td></tr>
    <tr><td class="paramname">length</td><td>The amount of bytes to write.</td></tr>
    <tr><td class="paramname">result</td><td>A pointer to a 16-bit unsigned integer where the result of the operation will be saved.</td></tr>
    <tr><td class="paramname">callback</td><td>A callback function that will be called when the operation completes.</td></tr>
    <tr><td class="paramname">callback_context</td><td>A pointer that will be passed to the callback function.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>One of the return codes defined in <a class="el" href="fat_8h.html" title="This is the header file for the FAT driver. It allows low level access to the file system...">fat.h</a>.</dd></dl>
<p>If the operation is initialized successfully this function will return FAT_OP_IN_PROGRESS, however the operation may still fail and the actual return code is stored on the 16 bit integer pointed to by the result parameter when the operation completes. </p>

</div>
</div>
<a class="anchor" id="a88d8f9c787986468fcc67b6e13d1daa3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_find_first_entry </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *&#160;</td>
          <td class="paramname"><em>volume</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>attributes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___d_i_r_e_c_t_o_r_y___e_n_t_r_y.html">FAT_DIRECTORY_ENTRY</a> **&#160;</td>
          <td class="paramname"><em>dir_entry</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FAT_FILESYSTEM_QUERY *&#160;</td>
          <td class="paramname"><em>query</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finds the first entry in a directory. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">volume</td><td>A pointer to the volume handle (<a class="el" href="struct_f_a_t___v_o_l_u_m_e.html" title="This structure is the volume handle. All the fields in the structure are reserved for internal use an...">FAT_VOLUME</a>).</td></tr>
    <tr><td class="paramname">path</td><td>The path of the directory to query.</td></tr>
    <tr><td class="paramname">attributes</td><td>An ORed list of file attributes to filter the query.</td></tr>
    <tr><td class="paramname">dir_entry</td><td>A pointer-to-pointer to a <a class="el" href="struct_f_a_t___d_i_r_e_c_t_o_r_y___e_n_t_r_y.html" title="Stores information about directory entries. ">FAT_DIRECTORY_ENTRY</a> structure. When this function returns the pointer will be set to to point to the directory entry. </td></tr>
    <tr><td class="paramname">query</td><td>A pointer to a FAT_FILESYSTEM_QUERY that will be initialized as the query handle.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>One of the return codes defined in <a class="el" href="fat_8h.html" title="This is the header file for the FAT driver. It allows low level access to the file system...">fat.h</a>.</dd></dl>

</div>
</div>
<a class="anchor" id="a595a506893aca97c9946b710b1146818"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_find_next_entry </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *&#160;</td>
          <td class="paramname"><em>volume</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___d_i_r_e_c_t_o_r_y___e_n_t_r_y.html">FAT_DIRECTORY_ENTRY</a> **&#160;</td>
          <td class="paramname"><em>dir_entry</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FAT_FILESYSTEM_QUERY *&#160;</td>
          <td class="paramname"><em>query</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finds the next entry in a directory. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">volume</td><td>A pointer to the volume handle (<a class="el" href="struct_f_a_t___v_o_l_u_m_e.html" title="This structure is the volume handle. All the fields in the structure are reserved for internal use an...">FAT_VOLUME</a>).</td></tr>
    <tr><td class="paramname">dir_entry</td><td>A pointer-to-pointer to a <a class="el" href="struct_f_a_t___d_i_r_e_c_t_o_r_y___e_n_t_r_y.html" title="Stores information about directory entries. ">FAT_DIRECTORY_ENTRY</a> structure. When this function returns the pointer will be set to point the the directory entry. </td></tr>
    <tr><td class="paramname">query</td><td>The file system query object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>One of the return codes defined in <a class="el" href="fat_8h.html" title="This is the header file for the FAT driver. It allows low level access to the file system...">fat.h</a>.</dd></dl>

</div>
</div>
<a class="anchor" id="a99816f5f466d245277bdf678152770f9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_get_file_entry </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *&#160;</td>
          <td class="paramname"><em>volume</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___d_i_r_e_c_t_o_r_y___e_n_t_r_y.html">FAT_DIRECTORY_ENTRY</a> *&#160;</td>
          <td class="paramname"><em>entry</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the directory entry of a file. This function should be used to get information about a file such as file size, timestamps, and attributes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">volume</td><td>The handle of the volume containing the file.</td></tr>
    <tr><td class="paramname">path</td><td>The path of the file within the volume.</td></tr>
    <tr><td class="paramname">entry</td><td>A pointer to a <a class="el" href="struct_f_a_t___d_i_r_e_c_t_o_r_y___e_n_t_r_y.html" title="Stores information about directory entries. ">FAT_DIRECTORY_ENTRY</a> structure where the details about the file will be stored. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>If successful it will return FAT_SUCCESS, otherwise it will return one of the result codes defined in <a class="el" href="fat_8h.html" title="This is the header file for the FAT driver. It allows low level access to the file system...">fat.h</a> &lt;/result&gt; </dd></dl>

</div>
</div>
<a class="anchor" id="aa0e058731eb04e82857b914b714c1723"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_get_sector_size </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *&#160;</td>
          <td class="paramname"><em>volume</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Gets the sector size of a volume in bytes.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">volume</td><td>A pointer to the volume handle.</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a3d1f5d8e3b22672684528c112bc6ff06"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fat_init </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initializes the FAT library.</p>

</div>
</div>
<a class="anchor" id="a747d45fc177d46ee2a0100a4a1326f46"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t fat_mount_volume </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_f_a_t___v_o_l_u_m_e.html">FAT_VOLUME</a> *&#160;</td>
          <td class="paramname"><em>volume</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_s_t_o_r_a_g_e___d_e_v_i_c_e.html">STORAGE_DEVICE</a> *&#160;</td>
          <td class="paramname"><em>device</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Mounts a FAT volume. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">volume</td><td>A pointer to a volume handle structure (<a class="el" href="struct_f_a_t___v_o_l_u_m_e.html" title="This structure is the volume handle. All the fields in the structure are reserved for internal use an...">FAT_VOLUME</a>).</td></tr>
    <tr><td class="paramname">device</td><td>A pointer to the storage device driver <a class="el" href="struct_s_t_o_r_a_g_e___d_e_v_i_c_e.html" title="Contains the interface between fat32lib and the underlying storage device driver. ...">STORAGE_DEVICE</a> structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>One of the return codes defined in <a class="el" href="fat_8h.html" title="This is the header file for the FAT driver. It allows low level access to the file system...">fat.h</a>.</dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_bddc50b92baa9add6b6d72ffa81b8add.html">fat32lib</a></li><li class="navelem"><a class="el" href="fat_8h.html">fat.h</a></li>
    <li class="footer">Copyright &copy; 2013 by <a href="mailto:frodriguez.developer@outlook.com">Fernando Rodriguez</a></li>
  </ul>
</div>
</body>
</html>
